﻿using System;
using System.Collections.Generic;
namespace Meeting.Model
{
    /// <summary>
    /// MeetingComment:实体类(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class MeetingComment
    {
        public MeetingComment()
        {
            ImageList = new List<ImageData>();
        }

        #region Model
        private Guid _id;
        private string _name;
        private int _meetingid;
        private DateTime _uploaddate = DateTime.Now;
        private string _employeeid = "";
        private string _employeename = "";
        private string _employeetitle = "";
        private string _roleid = "";
        private int _pagecount = 0;
        private string _path = "";
        private string _url = "";
        private Guid? _objectId = null;
        /// <summary>
        /// 主键
        /// </summary>
        public Guid Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 记事本名称
        /// </summary>
        public string Name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 所属会议ID
        /// </summary>
        public int MeetingId
        {
            set { _meetingid = value; }
            get { return _meetingid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime UploadDate
        {
            set { _uploaddate = value; }
            get { return _uploaddate; }
        }
        /// <summary>
        /// 用户主键（对应政务系统用户帐号）
        /// </summary>
        public string EmployeeId
        {
            set { _employeeid = value; }
            get { return _employeeid; }
        }
        /// <summary>
        /// 用户姓名
        /// </summary>
        public string EmployeeName
        {
            set { _employeename = value; }
            get { return _employeename; }
        }
        /// <summary>
        /// 人员职务
        /// </summary>
        public string EmployeeTitle
        {
            set { _employeetitle = value; }
            get { return _employeetitle; }
        }
        /// <summary>
        /// 用户角色Id
        /// </summary>
        public string RoleId
        {
            set { _roleid = value; }
            get { return _roleid; }
        }
        /// <summary>
        /// 上传图片的个数
        /// </summary>
        public int PageCount
        {
            set { _pagecount = value; }
            get { return _pagecount; }
        }
        /// <summary>
        /// 存储路径（日期部分）
        /// </summary>
        public string Path
        {
            set { _path = value; }
            get { return _path; }
        }

        /// <summary>
        /// 批注对应的原始图片路径
        /// </summary>
        public string URL
        {
            get { return _url; }
            set { _url = value; }
        }

        public Guid? ObjectId
        {
            get { return _objectId; }
            set { _objectId = value; }
        }
        #endregion Model

        #region 附件属性
        public List<ImageData> ImageList
        {
            get;
            set;
        }
        #endregion

    }

    public class ImageData
    {
        /// <summary>
        /// 图片序号
        /// </summary>
        public int Sort
        {
            get;
            set;
        }

        /// <summary>
        /// 图片base64字符串
        /// </summary>
        public string base64
        {
            get;
            set;
        }

        /// <summary>
        /// 图片数据（字节数组）
        /// </summary>
        public byte[] baseByte
        {
            get
            {
                return Convert.FromBase64String(base64);
            }
        }
    }
}

